home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1994.12.gz / 1994.12 / 000083_Robin.Fairbairns@cl.cam.ac.uk_Mon Dec 19 23:40:30 1994.msg < prev    next >
Internet Message Format  |  1994-12-30  |  3KB

  1. Received: from swan.cl.cam.ac.uk by cs.umb.edu with SMTP id AA28659
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 22 Dec 1994 14:50:04 -0500
  3. Received: from ouse.cl.cam.ac.uk (user rf (rfc931)) by swan.cl.cam.ac.uk 
  4.           with SMTP (PP-6.5) to cl; Mon, 19 Dec 1994 23:40:36 +0000
  5. To: dcanright@nps.navy.mil
  6. Cc: tex-k@cs.umb.edu, me@danhicks.math.nps.navy.mil
  7. Subject: Re: LaTeX problems with kpathsea
  8. In-Reply-To: Your message of "Mon, 19 Dec 1994 13:13:47 PST." <9412192113.AA05325@danhicks.math.nps.navy.mil>
  9. Date: Mon, 19 Dec 1994 23:40:30 +0000
  10. From: Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>
  11. Message-Id: <"swan.cl.cam.:186150:941219234040"@cl.cam.ac.uk>
  12.  
  13. > I am a professor at a math department, where I hacked together a
  14. > LaTeX style file to conform to our unusual thesis format.  This
  15. > worked fine with all previous LaTeX installations I tried (including
  16. > various Unix boxes and PC-TeX), but WILL NOT RUN with the version
  17. > our sysop just installed; at the point where I have the
  18. > "\begin{document}", latex reports:
  19. > >! LaTeX Error: Missing \begin{document}.
  20. > >See the LaTeX manual or LaTeX Companion for explanation.
  21. > >Type  H <return>  for immediate help.
  22. > > ...                                              
  23. > >l.13 \begin{document}
  24. > >                     
  25.  
  26. This is characteristic of a package that replaces \document (which
  27. executes \begin{document} for you) in a way that's inconsistent with
  28. the new LaTeX.  The original code probably did this in order to force
  29. something to be executed at the end of the preamble; the new LaTeX has
  30. a command \AtBeginDocument{...} which can be used to achieve this
  31. safely.
  32.  
  33. > Some technical notes: My style file was originally based on
  34. > % LATEX VERSION 2.09 <25 March 1992>
  35. > % Copyright (C) 1992 by Leslie Lamport
  36. > and "\input"ed files like "rep12.sty" and "titlepag.sty", which were
  37. > part of the standard release but are absent in this new version.  So
  38. > of course, I tried copying these files over, and latex finds them
  39. > fine, but I still get the above error.  My style re-"\def"s several
  40. > LaTeX commands defined in "latex.tex".
  41.  
  42. Is your style based on report.sty?  Or is it entirely of your own
  43. devising?  The best way of doing something that is based on one of the
  44. standard styles is to input the standard style and then to hack at
  45. what it defines.  Under LaTeX2e, you do this (and the other things you
  46. mention) by making a file myclass.cls, which says:
  47.  
  48.   \DeclareOption*{\PassOptionToClass{report}}{\CurrentOption}
  49.   \ExecuteOptions
  50.   \PassOptionToClass{report}{12pt} % this has the effect of loading rep12
  51.   \LoadClass{report}
  52.  
  53.   <... hack at definitions ...>
  54.  
  55.   \AtBeginDocument{...}
  56.  
  57.   \RequirePackage{titlepage}
  58.   \endinput
  59.  
  60. Your document should then start
  61.  
  62.   \documentclass{myclass}
  63.  
  64. > PLEASE HELP me find out why this old style will not work with the new latex.
  65.  
  66. That may (or may not -- one never knows) get you started, at least.
  67.  
  68. Note that LaTeX2e suppresses context in TeX's error messages; while
  69. you're debugging, you could probably do with a command
  70. \setcounter{errorcontextlines}{999} at the very start of your class.
  71.  
  72. Robin (Campaign for the Third Programme) Fairbairns  rf@cl.cam.ac.uk
  73. U of Cambridge Computer Lab, Pembroke St, Cambridge  CB2 3QG, UK
  74. Private page: http://www.cl.cam.ac.uk/users/rf/robin.html